#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> edge[27];
ll n, m, l, outd[27], ind[27], v[27], f[27], c[100002];
inline void dfs(ll x) {
	while (f[x] < v[x]) {
		ll y = edge[x][f[x]];
		++f[x];
		dfs(y);
		c[++l] = y;
	}
}
inline void Euler() {
	ll x = 0, y = 0, z = 0;
	for (ll i = 1; i <= n; ++i) {
		if (outd[i] == ind[i] + 1)
			x = i, ++y;
		if (outd[i] != ind[i])
			++z;
	}
	if (!(!z || (y == 1 && z == 2))) {
		printf("No\n");
		return;
	}
	if (!x)
		for (ll i = 1; i <= n; ++i)
			if (!ind[i])
				x = i;
	memset(f, 0, sizeof(f));
	l = 0;
	dfs(x);
	c[++l] = x;
	if (l == m + 1) {
		printf("Yes\n");
		for (ll i = l; i; --i)
			printf("%lld ", c[i]);
	}
		
	else
		printf("No\n");
}

int main() {
	n = 26;
	scanf("%lld", &m);
	for (ll i = 1; i <= m; ++i) {
		char str[101];
		scanf("%s", str);
		ll x = str[0] - 'a' + 1, y = str[strlen(str) - 1] - 'a' + 1;
		edge[x].push_back(y);
		++outd[x], ++ind[y];
		++v[x];
	}
	Euler();
	return 0;
}
